import request from '@/utils/request'

export function getThreshold() {
  return request({
    url: '/directory/threshold',
    method: 'get'
  })
}

export function getStoreOrderLimitDefault() {
  return request({
    url: '/directory/storeOrderLimitDefault',
    method: 'get'
  })
}

export function getGoodsTimeInterval() {
  return request({
    url: '/directory/goodsTimeInterval',
    method: 'get'
  })
}

export function getRunRangeLt() {
  return request({
    url: '/directory/runRangeLt',
    method: 'get'
  })
}

export function getOrderTimeout() {
  return request.get(`/directory/orderTimeout`)
}

export function saveThreshold(threshold) {
  return request.post(`/directory/threshold`, { threshold })
}

export function saveStoreOrderLimitDefault(storeOrderLimitDefault) {
  return request.post(`/directory/storeOrderLimitDefault`, { storeOrderLimitDefault })
}

export function saveGoodsTimeInterval(goodsTimeInterval) {
  return request.post(`/directory/goodsTimeInterval`, { goodsTimeInterval })
}

export function saveRunRangeLt(runRangeLt) {
  return request.post(`/directory/runRangeLt`, { runRangeLt })
}

export function saveOrderTimeout(orderTimeout) {
  return request.post(`/directory/orderTimeout`, { orderTimeout })
}
